/*    */ package eos.moe.dragoncore.tweaker.transform;
/*    */ import eos.moe.dragoncore.tweaker.TransformerManager;
/*    */ import eos.moe.dragoncore.xfa;
/*    */ import org.objectweb.asm.tree.AbstractInsnNode;
/*    */ import org.objectweb.asm.tree.InsnNode;
/*    */ import org.objectweb.asm.tree.JumpInsnNode;
/*    */ import org.objectweb.asm.tree.LabelNode;
/*    */ import org.objectweb.asm.tree.MethodInsnNode;
/*    */ import org.objectweb.asm.tree.MethodNode;
/*    */ import org.objectweb.asm.tree.VarInsnNode;
/*    */ 
/*    */ public class FontRendererTransform {
/*    */   public static String getOwner() {
/* 14 */     return FontRendererTransform.class.getName().replace(".", "/");
/*    */   }
/*    */   
/*    */   public static class Transformer_renderItem
/*    */     implements TransformerManager.IMethodTransformer
/*    */   {
/*    */     public void transform(ClassNode classNode, MethodNode methodNode) {
/* 21 */       LabelNode labelNode = (LabelNode)methodNode.instructions.get(0);
/*    */       
/* 23 */       methodNode.instructions.insert((AbstractInsnNode)new InsnNode(174));
/* 24 */       methodNode.instructions.insert((AbstractInsnNode)new MethodInsnNode(184, FontRendererTransform.getOwner(), "getWidth", "(C)F", false));
/* 25 */       methodNode.instructions.insert((AbstractInsnNode)new VarInsnNode(21, 1));
/*    */ 
/*    */       
/* 28 */       methodNode.instructions.insert((AbstractInsnNode)new JumpInsnNode(155, labelNode));
/* 29 */       methodNode.instructions.insert((AbstractInsnNode)new InsnNode(149));
/* 30 */       methodNode.instructions.insert((AbstractInsnNode)new InsnNode(11));
/* 31 */       methodNode.instructions.insert((AbstractInsnNode)new MethodInsnNode(184, FontRendererTransform.getOwner(), "getWidth", "(C)F", false));
/* 32 */       methodNode.instructions.insert((AbstractInsnNode)new VarInsnNode(21, 1));
/*    */     }
/*    */   }
/*    */ 
/*    */   
/*    */   public static float getWidth(char a) {
/* 38 */     xfa xfa = mca.q.v(a);
/* 39 */     return (xfa == null) ? -1.0F : xfa.k();
/*    */   }
/*    */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\tweaker\transform\FontRendererTransform.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */